
from rest_framework.generics import ListAPIView
from rest_framework.viewsets import ModelViewSet
from meiduo_admin.serializers.admin_serializers import *
from meiduo_admin.paginators import MyPage


class GroupSimpleListView(ListAPIView):
    queryset = Group.objects.all()
    serializer_class = GroupSimpleModelSerializer


class AdminUserViewSet(ModelViewSet):
    queryset = User.objects.filter(is_staff=True)
    serializer_class = AdminUserModelSerializer
    pagination_class = MyPage